var dirImg = "res/images/";
var dirSound = "res/sound/";

var s_start = dirImg + "Default@2x.png";
var s_bg_day = dirImg + "bg_day.png";
var s_bg_night = dirImg + "bg_night.png";
var s_logo = dirImg + "title.png";
var s_get_ready = dirImg + "ready.png";
var s_game_over = dirImg + "game_over.png";
var s_bird = function(n){
    return dirImg + "bird" + n + "_1.png";
}
var s_b_font = function(n){
    return dirImg + "b" + n + ".png";
}
var s_s_font = function(n){
    return dirImg + "s" + n + ".png";
}
var s_medal = function(n){
    return dirImg + "medal_" + n + ".png";
}
var s_button_play = dirImg + "button_play.png";
var s_ground = dirImg + "ground.png";
var s_pipe_bottom = dirImg + "pipe_bottom.png";
var s_pipe_top = dirImg + "pipe_top.png";
var s_score_panel = dirImg + "button_score.png";
var s_tip = dirImg + "tip.png";

var s_die_ogg = dirSound + "sfx_die.ogg";
var s_hit_ogg = dirSound + "sfx_hit.ogg";
var s_point_ogg = dirSound + "sfx_point.ogg";
var s_swooshing_ogg = dirSound + "sfx_swooshing.ogg";
var s_wing_ogg = dirSound + "sfx_wing.ogg";

var g_resources = [{
    src: s_start
}, {
    src: s_bg_day
}, {
    src: s_bg_night
}, {
    src: s_logo
}, {
    src: s_get_ready
}, {
    src: s_game_over
}, {
    src: s_button_play
}, {
    src: s_ground
}, {
    src: s_pipe_bottom
}, {
    src: s_pipe_top
}, {
    src: s_score_panel
}, {
    src: s_tip
}, {
    src: s_die_ogg
}, {
    src: s_hit_ogg
}, {
    src: s_point_ogg
}, {
    src: s_swooshing_ogg
}, {
    src: s_wing_ogg
}]

for (var i = 0; i < 3; i++) {
    for (var j = 0; j < 3; j++) {
        g_resources.push({
            src: dirImg + "bird" + i + "_" + j + ".png"
        });
    }
}

for (var i = 0; i < 10; i++) {
    g_resources.push({
        src: s_b_font(i)
    });
}
for (var i = 0; i < 10; i++) {
    g_resources.push({
        src: s_s_font(i)
    });
}
for (var i = 0; i < 4; i++) {
    g_resources.push({
        src: s_medal(i+1)
    });
}
